//
//  DateExt.swift
//  JiaoZiTaxi
//
//  Created by Hu Gang on 2022/10/12.
//

import Foundation

extension Date {
  func toDisplayString(_ format:String) -> String {
    let dateFormatter = DateFormatter()
    dateFormatter.dateFormat = format
    return dateFormatter.string(from: self)
  }
}
